package com.banconacion.dao.base;

import com.banconacion.dao.ClienteDAO;
import com.banconacion.dao.SolicitudAperturaDAO;
import com.banconacion.dao.UsuarioDAO;
import com.banconacion.dao.base.mysql.MySqlDAOFactory;
import com.banconacion.dao.base.oracle.OracleDAOFactory;
import com.banconacion.dao.base.xml.XmlDAOFactory;
import java.util.List;

public abstract class DAOFactory {

    public static final int MYSQL = 1;
    public static final int ORACLE = 2;
    public static final int DB2 = 3;
    public static final int SQLSERVER = 4;
    public static final int XML = 5;

    public abstract ClienteDAO getClienteDAO();

    public abstract UsuarioDAO getUsuarioDAO();

    public abstract SolicitudAperturaDAO SolicitudAperturaDAO();

    public static DAOFactory getDAOFactory(int whichFactory) {
        switch (whichFactory) {
            case MYSQL:
                return new MySqlDAOFactory();
            case XML:
                return new XmlDAOFactory();
            case ORACLE:
                return new OracleDAOFactory();
            /*case DB2:
            return new Db2DAOFactory();
            case SQLSERVER:
            return new SqlServerDAOFactory();
            case XML:
            return new XmlDAOFactory();*/
            default:
                return null;
        }
    }
    
    
}
